//
//  AssetnewViewController.m
//  project
//
//  Created by 张亚林 on 2017/10/31.
//  Copyright © 2017年 Macmini. All rights reserved.
//

#import "AssetnewViewController.h"

#import "ChongzhiTagView.h"
#import "ZhongzhiTableViewCell.h"
#import "TibiTableViewCell.h"

@interface AssetnewViewController ()<UITableViewDelegate, UITableViewDataSource>

@property (weak, nonatomic) IBOutlet UIScrollView *scroll;
@property (weak, nonatomic) IBOutlet UITableView *chongzhiTableView;
@property (weak, nonatomic) IBOutlet UITableView *tibiTableView;
@property (weak, nonatomic) IBOutlet UIView *chongzhiTagView;

@property (weak, nonatomic) IBOutlet UIView *topView;


@end

@implementation AssetnewViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    self.chongzhiTableView.delegate = self;
    self.chongzhiTableView.dataSource = self;
    self.tibiTableView.delegate = self;
    self.tibiTableView.dataSource = self;
   
   // self.chongzhiTagView = [[NSBundle mainBundle]loadNibNamed:@"ZhongzhiTagView" owner:nil options:nil].lastObject;
    
}

//- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
//
//    ChongzhiTagView *chognzhiTagView = [[NSBundle mainBundle]loadNibNamed:@"ZhongzhiTagView" owner:nil options:nil].lastObject;
//    return chognzhiTagView;
//}
//
//- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
//    return 83;
//}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    if (tableView.tag == 101) {
        ZhongzhiTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"zhongzhiTableViewCell"];
        if (!cell) {
            cell = [[NSBundle mainBundle]loadNibNamed:@"ZhongzhiTableViewCell" owner:nil options:nil].lastObject;
        }
        return cell;
    } else {
        
        TibiTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"tibiTableViewCell"];
        if (!cell) {
            cell =[[NSBundle mainBundle]loadNibNamed:@"TibiTableViewCell" owner:nil options:nil].lastObject;
        }
        return cell;
    }
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    if (tableView.tag == 101) {
        return 3;
    } else {
         return 6;
    }
   
}


- (IBAction)greenBtn:(id)sender {
    
    NSLog(@"%@", @"dfsfdsfdsfds");
}

- (void)didReceiveMemoryWarning {
    
    [super didReceiveMemoryWarning];
    
}
- (IBAction)blueBtn:(id)sender {
    NSLog(@"%@", @"ewrqrwrw");
}

- (IBAction)click1:(id)sender {
    
    self.scroll.contentOffset = CGPointMake(0, 0);
    
}
- (IBAction)click2:(id)sender {
    
    self.scroll.contentOffset = CGPointMake(self.view.frame.size.width, 0);
}

@end
